package com.situ.cloud.order.controller;


import com.situ.cloud.order.entity.OrderInfo;
import com.situ.cloud.order.service.IOrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author kkkkkk
 * @since 2023-10-20
 */
@RefreshScope//自动刷新配置文件中读的值
@RestController
@RequestMapping("/order")
public class OrderInfoController {

    @Autowired
    private IOrderInfoService orderInfoService;


    @Value("${alipay.appid}")
    private String appId;

    @GetMapping("/{id}")
    public OrderInfo selectById(@PathVariable Integer id){
        System.out.println(appId);
        return orderInfoService.info(id);
    }

}
